import http from '@/plugins/axios'

// 列表
export function getEmployeeManagement(data) {
  return http({
    method: 'POST',
    url: '/sys/user/list',
    data: data
  })
}

// 新增
export function addEmployeeManagement(data) {
  console.log(data)
  return Promise.reject()
  // return http({
  //   method: 'POST',
  //   url: '/sys/user/save',
  //   data: data
  // })
}

// 获取详情
export function getEmployeeManagementDetail(id) {
  return http({
    method: 'POST',
    url: '/sys/user/info',
    data: { userId: id }
  })
}

// 修改
export function updateEmployeeManagement(data) {
  console.log(data)
  return http({
    method: 'POST',
    url: '/sys/user/update',
    data: data
  })
}

// 导出
export function exportEmployeeManagement(data) {
  return Promise.reject(new Error('导出功能研发中'))
  // return http({
  //   rowResponse: true,
  //   method: 'POST',
  //   url: '/fa/hotels/export',
  //   responseType: 'blob',
  //   data
  // })
}

// 删除
export function removeEmployeeManagement(id) {
  return http({
    method: 'POST',
    url: '/sys/user/delete',
    data: [id]
  })
}